<template>
  <component :is="comp"></component>
</template>

<script>
  import admin  from './admin'
  import editor  from './editor'
  import { mapGetters } from 'vuex'
  export default {
    name: 'dashboard_view',
    components: {
      admin, editor
    },
    data () {
      return {
        comp: ''
      }
    },
    computed:{
      ...mapGetters(['token'])
    },
    created: function(){
      this.comp = this.token
      console.log('create component Dashboard')
    },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
  .editor{

  }
</style>
